package com.cbt.cbtBlog.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public class StringUtil {
   public static boolean checkNull(String... args) {
      if (args.length > 0 && args != null) {
         String[] var1 = args;
         int var2 = args.length;

         for(int var3 = 0; var3 < var2; ++var3) {
            String arg = var1[var3];
            if (arg == null || "".equals(arg)) {
               return true;
            }
         }

         return false;
      } else {
         return true;
      }
   }

   public static boolean checkNull(Object... objs) {
      if (objs.length > 0 && objs != null) {
         Object[] var1 = objs;
         int var2 = objs.length;

         for(int var3 = 0; var3 < var2; ++var3) {
            Object obj = var1[var3];
            if (obj == null || "".equals(String.valueOf(obj))) {
               return true;
            }
         }

         return false;
      } else {
         return true;
      }
   }

   public static String getUUid() {
      SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
      Date date = new Date();
      String now = sdf.format(date);
      String randomNumber = "";
      Random r = new Random();

      for(int i = 0; i < 15; ++i) {
         randomNumber = randomNumber + r.nextInt(10) + "";
      }

      String UUID = now + randomNumber;
      return UUID;
   }
}
